import withData from '@/components/Leaf/withData.js'
import { Component } from 'react'

class LeafTypeOne extends Component {
  render () {
    const rotate = Math.random() * 90
    const index = '2px' // 成长系数
    return (
      <div
        className={`LeafTypeOne Leaf ${this.props.fall ? 'falling' : ''}`}
        style={{
          '--leaf-height': this.props.height,
          '--leaf-rotate': rotate,
          '--leaf-times': index,
          '--grow-times': this.props.growTimes,
        }}>
        {this.props.children}
      </div>
    )
  }
}

export default withData(LeafTypeOne);